package com.iotechn.unimall.app.api.active;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.ActiveUserDO;

import java.util.List;

/**
 * 活动参与人
 *
 * @author hct
 * @email 77802226@qq.com
 * @date 2022-05-25 21:44:39
 */
@HttpOpenApi(group = "activeUser", description = "")
public interface ActiveUserService {

    @HttpMethod(description = "列表")
    public List<ActiveUserDO> list(
            @HttpParam(name = "activeId", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Long activeId
    ) throws ServiceException;


    @HttpMethod(description = "报名")
    public ActiveUserDO create(
            @NotNull @HttpParam(name = "activeUserDO", type = HttpParamType.COMMON, description = "") ActiveUserDO activeUserDO,
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "管理员ID") Long userId
    ) throws ServiceException;

    @HttpMethod(description = "取消报名")
    public String delete(
            @NotNull @HttpParam(name = "activeId", type = HttpParamType.COMMON, description = "删除Id") Long activeId,
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "管理员ID") Long userId

    ) throws ServiceException;


}

